<?php		




class IndexAdmin extends AdminBase{

	private $nohf = array("index","apidownload");
	/**
	 * 构造函数，初始化插件
	 */
	public function __construct() {
		parent::__construct();
		if(!in_array(N_ACTION,$this->nohf)){
			n_mod('skin')->header();
		}
	}


	
	public function index(){

		$this->_html('index');
	}
	
	public function wapIndex(){
		if(!n_api("passport")->islogin()){
			n_go(n_url('passport','login'));
		}		
		$rs['site'] = n_api("nsite")->getMemberSite($_SESSION['ppid']);
		$this->_html('wapIndex',$rs);
	}

	public function manage()
	{
		$this->_html('manage');
	}

	public function welcome(){
		n_mod('skin')->header();
		$this->_html('welcome');
	}
	public function help(){
		n_mod('skin')->header();
		$this->_html('help-wap');
	}
	public function apidownload(){
		header('Content-type: application/vnd.openxmlformats'); 
		//下载显示的名字 
		header('Content-Disposition: attachment; filename="dmsapi.docx"'); 
		echo file_get_contents(N_PLUGINS.'/index/file/api.docx');
	}
	public function __destruct(){
		if(!in_array(N_ACTION,$this->nohf)){
			//n_mod('skin')->footer();
		}
	}
}

